/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;

import me.zhengjie.modules.system.domain.WxUser;
/**
* @website https://el-admin.vip
* @description /
* @author zhaoxiancheng
* @date 2021-11-18
**/
@Entity
@Data
@Table(name="exam_result")
public class ExamResult implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "编号自增")
    private Integer id;

    @Column(name = "wx_id")
    @ApiModelProperty(value = "微信id")
    private String wxId;

    @Column(name = "wx_name")
    @ApiModelProperty(value = "微信名")
    private String wxName;

    @Column(name = "sex")
    @ApiModelProperty(value = "性别")
    private String sex;

    @Column(name = "atmr_id")
    @ApiModelProperty(value = "测试类型")
    private String atmrId;

    @Column(name = "exam_time")
    @ApiModelProperty(value = "测试时间")
    private String examTime;

    @Column(name = "exam_result")
    @ApiModelProperty(value = "测试结果")
    private String examResult;

    @Column(name = "exam_content")
    @ApiModelProperty(value = "测试内容")
    private String examContent;

    @Column(name = "report_url")
    @ApiModelProperty(value = "生成报告路径")
    private String reportUrl;

    @Column(name = "report_json")
    @ApiModelProperty(value = "数据")
    private String reportJson;

    @Column(name = "atmr_type")
    @ApiModelProperty(value = "测试类型")
    private String atmrType;

    @Column(name = "uuid")
    @ApiModelProperty(value = "uuid")
    private String uuid;

    @Column(name = "echart_pho")
    @ApiModelProperty(value = "echart_pho")
    private String echart_pho;

    @Column(name = "group_id")
    @ApiModelProperty(value = "group_id")
    private String groupId;

    @Column(name = "atmr_result_type")
    @ApiModelProperty(value = "测评ATMR")
    private String atmrResultType;

    /**
     *
     */
    @Column(name = "exam_database_id")
    @ApiModelProperty(value = "题库ID")
    private Long examDatabaseId;

    @Column(name = "relationship")
    @ApiModelProperty(value = "家庭成员关系")
    private String relationship;

    @Column(name = "member_name")
    @ApiModelProperty(value = "家庭成员名称")
    private String memberName;

    @Column(name = "order_no")
    @ApiModelProperty(value = "订单号")
    private String orderNo;

    @Column(name = "member_id")
    @ApiModelProperty(value = "家庭成员Id")
    private Long memberId;

    @Column(name = "sy_te_zhi")
    @ApiModelProperty(value = "首要特质")
    private String syTeZhi;

    @Column(name = "wxRealName")
    @ApiModelProperty(value = "微信真实姓名")
    private String wxRealName;

    @Transient
    @TableField(exist = false)
    private WxUser wxUser;

    @Column(name = "ent_code")
    @ApiModelProperty(value = "企业编码")
    private String entCode;

    @Column(name = "group_code")
    @ApiModelProperty(value = "团队编码")
    private String groupCode;

    @Column(name = "company_code")
    @ApiModelProperty(value = "公司编码")
    private String companyCode;

    @Column(name = "mobile")
    @ApiModelProperty(value = "手机号")
    private String mobile;

    @Column(name = "report_price")
    @ApiModelProperty(value = "报告价格")
    private BigDecimal reportPrice;

    @Column(name = "group_index")
    @ApiModelProperty(value = "团队索引")
    private Integer groupIndex;
    public void copy(ExamResult source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}